/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/ccjzxyxt">ccjzxyxt</a> All rights reserved.
 */
package cn.net.dckj.modules.biz.entity;

import org.hibernate.validator.constraints.Length;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import javax.validation.constraints.NotNull;

import cn.net.dckj.common.persistence.DataEntity;

/**
 * 虚拟机使用申请Entity
 * @author hqj
 * @version 2019-04-20
 */
public class BizVmApply extends DataEntity<BizVmApply> {
	
	private static final long serialVersionUID = 1L;
	private String name;			// 名称
	private Date applyStartDate;	// 使用开始时间
	private Date applyEndDate;		// 使用结束时间
	private Double useTime;			// 使用分钟
	private String applyId;			// 申请人编号
	private String applyIdCard;		// 申请人身份证号
	private String applyName;		// 申请人姓名
	private String applyReason;		// 申请原因
	private String checkId;			// 审核人编号
	private String checkName;		// 审核人姓名
	private String checkFlag;		// 审核标记，字典[审核标记check_flag] 0未申请1已申请2已通过3未通过4已结束
	private String checkReason;		// 审核未通过原因
	private Date checkDate;			// 审核时间
	
	public BizVmApply() {
		super();
	}

	public BizVmApply(String id){
		super(id);
	}

	@Length(min=1, max=100, message="名称长度必须介于 1 和 100 之间")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@NotNull(message="使用开始时间不能为空")
	public Date getApplyStartDate() {
		return applyStartDate;
	}

	public void setApplyStartDate(Date applyStartDate) {
		this.applyStartDate = applyStartDate;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	@NotNull(message="使用结束时间不能为空")
	public Date getApplyEndDate() {
		return applyEndDate;
	}

	public void setApplyEndDate(Date applyEndDate) {
		this.applyEndDate = applyEndDate;
	}

	public Double getUseTime() {
		return useTime;
	}

	public void setUseTime(Double useTime) {
		this.useTime = useTime;
	}
	
	@Length(min=1, max=64, message="申请人编号长度必须介于 1 和 64 之间")
	public String getApplyId() {
		return applyId;
	}

	public void setApplyId(String applyId) {
		this.applyId = applyId;
	}
	
	@Length(min=1, max=18, message="申请人身份证号长度必须介于 1 和 18 之间")
	public String getApplyIdCard() {
		return applyIdCard;
	}

	public void setApplyIdCard(String applyIdCard) {
		this.applyIdCard = applyIdCard;
	}
	
	@Length(min=1, max=100, message="申请人姓名长度必须介于 1 和 100 之间")
	public String getApplyName() {
		return applyName;
	}

	public void setApplyName(String applyName) {
		this.applyName = applyName;
	}
	
	@Length(min=0, max=100, message="申请原因长度必须介于 0 和 100 之间")
	public String getApplyReason() {
		return applyReason;
	}

	public void setApplyReason(String applyReason) {
		this.applyReason = applyReason;
	}
	
	@Length(min=0, max=64, message="审核人编号长度必须介于 0 和 64 之间")
	public String getCheckId() {
		return checkId;
	}

	public void setCheckId(String checkId) {
		this.checkId = checkId;
	}
	
	@Length(min=0, max=100, message="审核人姓名长度必须介于 0 和 100 之间")
	public String getCheckName() {
		return checkName;
	}

	public void setCheckName(String checkName) {
		this.checkName = checkName;
	}
	
	@Length(min=1, max=1, message="审核标记长度必须介于 1 和 1 之间")
	public String getCheckFlag() {
		return checkFlag;
	}

	public void setCheckFlag(String checkFlag) {
		this.checkFlag = checkFlag;
	}
	
	@Length(min=0, max=100, message="审核未通过原因长度必须介于 0 和 100 之间")
	public String getCheckReason() {
		return checkReason;
	}

	public void setCheckReason(String checkReason) {
		this.checkReason = checkReason;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
	public Date getCheckDate() {
		return checkDate;
	}

	public void setCheckDate(Date checkDate) {
		this.checkDate = checkDate;
	}
	
}